package xyz.ddlnt.commonutil.enumeration;

import lombok.AllArgsConstructor;
import lombok.Getter;


@Getter
@AllArgsConstructor
public enum ResultCode {

    SUCCESS(200, "成功"),
    CLIENT_SIDE_ERROR(400, "客户端错误"),
    USER_NOT_LOGIN(401, "用户未登录"),
    USER_NOT_AUTHORIZED(403, "用户未授权"),
    RESOURCE_NOT_FOUND(404, "资源不存在"),
    SERVER_ERROR(500, "服务端错误"),

    USER_EXIST(10001, "用户已存在"),
    USER_NOT_EXIST(10002, "用户不存在"),
    USER_PASSWORD_ERROR(10003, "用户密码错误"),
    USER_NOT_PERMISSION(10005, "用户无权限"),
    USER_NOT_ROLE(10006, "用户未角色"),
    USER_NOT_ROLE_PERMISSION(10007, "用户未角色权限"),
    ARGUMENT_VALID_ERROR(10008, "参数校验错误"),
    PERMISSION_DENIED(10009, "权限不足"),
    THE_REMOTE_PROCEDURE_CALL_FAILED(10010, "远程过程调用失败"),
    NAME_ALREADY_EXISTS(10011, "名称已存在"),
    WITH_NEW_FAILURES(10012, "更新失败"),
    CATEGORY_NOT_SELECTED(10013, "未选择类别"),
    NAME_NOT_ENTERED(10014, "未输入名称"),
    CONTENT_IS_EMPTY(10015, "内容为空");

    private final Integer code;
    private final String message;

}
